﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="UserStatistics.aspx.cs" Inherits="App.UserStatistics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:Panel ID="Panel1" runat="server">
        <h1 class="detailNick">
            <asp:Label ID="LabelNick" runat="server" Font-Bold="True"></asp:Label>
        </h1>
       
        <ajaxToolkit:Gravatar ID="ImageAvatar2" runat="server" DefaultImageBehavior="Identicon" CssClass="detailAvatar"/><!-- jenom pro potreby nastylovani -->
        
<%--        <div class="clear"></div>

        <asp:Label ID="lblFrom" runat="server" Text="Od:"></asp:Label>
        <asp:TextBox ID="txtBoxFrom" runat="server" ></asp:TextBox>
        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtBoxFrom" Format="dd.MM.yyyy" TodaysDateFormat="d, MMMM, yyyy"></ajaxToolkit:CalendarExtender>
        <asp:Label ID="lblTo" runat="server" Text="Do:"></asp:Label>
        <asp:TextBox ID="txtBoxTo" runat="server" ></asp:TextBox>
        <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtBoxTo" Format="dd.MM.yyyy" TodaysDateFormat="d, MMMM, yyyy"></ajaxToolkit:CalendarExtender>

        <div class="formButton">
          <asp:Button ID="filterButton" runat="server" Text="Nastavit filtr" 
                onclick="filterButton_Click" />
        </div>--%>
       
        <div class="clear"></div>

        <asp:Repeater ID="RepeaterTeamMember" runat="server">
            <HeaderTemplate>
                <h1 class="detailHeader">Kredit v jednotlivých týmech:</h1>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="creditList">
                   <ajaxToolkit:Gravatar ID="ImageAvatar1" runat="server" DefaultImageBehavior="Identicon" Email="<%#GetTeamID(Container.DataItem)%>" DefaultImage="<%#GetTeamAvatar(Container.DataItem)%>" CssClass="detailTeamAvatar"/><!-- jenom pro potreby nastylovani -->
                   <span class="nick">
                   <asp:LinkButton ID="LinkButtonTeamInfo1" runat="server" CommandArgument='<%#Eval("TeamID")%>' OnClick="LinkButtonTeamInfo_Click" Text="<%#GetTeamName(Container.DataItem)%>"></asp:LinkButton>
                   </span>
                   <asp:LinkButton CssClass="clear" ID="LinkButtonDeleteUserStatistics" runat="server" CommandArgument='<%#Eval("TeamID")%>' OnClick="LinkButtonDeleteUserStatistics_Click" Text="Vymazat statistiky" Visible="<%#IsUserTreasurer(Container.DataItem)%>"></asp:LinkButton>
                        <ajaxToolkit:ConfirmButtonExtender ID="confirmButtonExtender1" runat="server" TargetControlID="LinkButtonDeleteUserStatistics" ConfirmText="Opravdu chcete vymazat statistiky tohoto týmu?" ConfirmOnFormSubmit="true">
                        </ajaxToolkit:ConfirmButtonExtender>
                        <div class="items">
                        <asp:Repeater ID="RepeaterUserStatistics" runat="server"  DataSource="<%#DataSource(Container.DataItem)%>">
                            <ItemTemplate>                                
                                <asp:Label CssClass="date" ID="lblDate" runat="server" Text="<%#GetCreditDate(Container.DataItem)%>"></asp:Label>
                                <asp:Label CssClass="credit" ID="lblCredit" runat="server" Text='<%#GetUserCredit(Container.DataItem)+" Kč"%>'></asp:Label>
                                <asp:Label CssClass="description" ID="lblDescription" runat="server" Text="<%#GetCreditDescription(Container.DataItem)%>"></asp:Label>
                                <br>
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:Label CssClass="added" ID="lblTotalCredit" runat="server">Zůstatek: <%#GetMemberTotalCredit()%> Kč</asp:Label>
                                <br />
                                <asp:Label CssClass="added" ID="lblPlusCredit" runat="server">Připsáno celkem: <%#GetMemberPlusCredits()%> Kč</asp:Label>
                                <asp:Label CssClass="paid" ID="lblMinusCredit" runat="server">Odečteno celkem: <%#GetMemberMinusCredits()%> Kč</asp:Label>
                            </FooterTemplate>
                        </asp:Repeater>
                        </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>

    </asp:Panel>
</asp:Content>
